package com.sakila.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.sakila.pojo.Member;
import com.sakila.pojo.Payment;
import com.sakila.pojo.Rental;
import com.sakila.pojo.other.Page;

public interface PaymentDao extends BaseDao<Payment> {
	List<Payment> findUnreturned(@Param("page")Page page, @Param("member")Member member);
	List<Payment> findByProperties(@Param("page")Page page, @Param("payment")Payment payment);
	Long getTotalNumOfRowsByCustomer(@Param("member")Member member);
	List<Payment> findByPeriod(@Param("page")Page page, 
							@Param("member")Member member,
							@Param("startDate")Date startDate, 
							@Param("endDate")Date endDate);
	Long getTotalNumOfRowsByPeriod(@Param("member")Member member, 
								@Param("startDate")Date startDate, 
								@Param("endDate")Date endDate);
	Long getTotalNumOfRowsByUnreturned(@Param("member")Member member);
	void updateRental(Rental rental);
}
